----------------------------------------------------------------------------------------------------------------------------------
--[[

    用来激活

]]--
----------------------------------------------------------------------------------------------------------------------------------
local loramia_com_item_spell_controller = Class(function(self, inst)
    self.inst = inst

    self.spell_inst = nil

end,
nil,
{

})
------------------------------------------------------------------------------------------------------------------------------
---
    function loramia_com_item_spell_controller:Cancel()
        if self.spell_inst and self.spell_inst:IsValid() then
            self.spell_inst:Remove()
        end
        self.spell_inst = nil
    end
    function loramia_com_item_spell_controller:StartSpell(prefab)
        self:Cancel()
        if not PrefabExists(prefab) then
            return
        end
        local temp_inst = self.inst:SpawnChild(prefab)
        if temp_inst.components.loramia_com_item_spell and temp_inst.components.loramia_com_item_spell:Test(self.inst) then
            temp_inst.components.loramia_com_item_spell:SetOwner(self.inst)
            self.spell_inst = temp_inst
        else
            temp_inst:Remove()
        end
    end
------------------------------------------------------------------------------------------------------------------------------
return loramia_com_item_spell_controller







